#include "cubes.h"
#include "ui_cubes.h"
#include "QPainter"
#include "QTimer"
#include "QKeyEvent"

//restart
void Cubes::on_pushButton_clicked()
{
    delete timer;
    blsRun = false;
    paint = true;
    Clear3();
    InitCubes();
}

//pause
void Cubes::on_pushButton_2_clicked()
{
    Display = "游戏暂停";
    update();
    timer->stop();
}

//continue
void Cubes::on_pushButton_3_clicked()
{
    Display = "游戏继续";
    timer->start(times);
}

void Cubes::on_toolButton_clicked()
{
    h.show();
    on_pushButton_2_clicked();
}
